﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ResourceEditor.Core.Search
{
    public class SearchStructure
    {
        #region Properties
        public string FindWhat { get; set; }
        public string LookIn { get; set; }
        public bool Keys { get; set; }
        public bool Values { get; set; }
        public bool Contain { get; set; }
        #endregion

        #region Methods
        public override bool Equals(object obj)
        {
            SearchStructure other = (SearchStructure)obj;

            return other.Contain == this.Contain &&
                other.FindWhat == this.FindWhat &&
                other.Keys == this.Keys &&
                other.LookIn == this.LookIn &&
                other.Values == this.Values;
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public SearchStructure Clone()
        {
            return (SearchStructure)MemberwiseClone();
        }
        #endregion

        #region Operator Overload
        public static bool operator ==(SearchStructure one, SearchStructure second)
        {
            return one.Equals(second);
        }

        public static bool operator !=(SearchStructure one, SearchStructure second)
        {
            return !one.Equals(second);
        }
        #endregion
    }
}
